Matthias Clasen [Sun, 28 Apr 2019 15:33:07 +0000 (15:33 +0000)]
Merge branch 'wip/baedert/filechooser2' into 'master'
Assorted filechooser improvements
See merge request GNOME/gtk!783
Matthias Clasen [Sun, 28 Apr 2019 15:27:51 +0000 (15:27 +0000)]
Merge branch 'file-chooser-escape' into 'master'
file chooser: Prevent accidental search
Closes #1850
See merge request GNOME/gtk!784
Matthias Clasen [Sun, 28 Apr 2019 15:17:32 +0000 (15:17 +0000)]
file chooser: Prevent accidental search
When hitting Escape, the file chooser will go
into search mode, because the search entry
consumes the key to emit the ::search-stopped
signal. Recognize this situation and avoid
switching to search mode in this case.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1850
Timm Bäder [Sun, 28 Apr 2019 09:30:13 +0000 (11:30 +0200)]
filechooserwidget: Use a center box for the search entry
This way we can avoid a slight position offset when we show or hide the
spinner during a search.
Timm Bäder [Sun, 28 Apr 2019 09:27:42 +0000 (11:27 +0200)]
filechooserwidget: Allow keynav from the treeview to the search entry
Timm Bäder [Sun, 28 Apr 2019 09:27:21 +0000 (11:27 +0200)]
window: Check whether the new focus widget is the old one
We generally do that for all properties.
Timm Bäder [Sun, 28 Apr 2019 09:26:40 +0000 (11:26 +0200)]
treeview: Don't always grab_focus() when moving the cursor
This doesn't really make sense, we can assume that the treeview already
has the focus when it receives key events.
Timm Bäder [Sun, 28 Apr 2019 09:08:09 +0000 (11:08 +0200)]
filechooserwidget: Remove unneeded function prototype
Timm Bäder [Sun, 28 Apr 2019 09:07:14 +0000 (11:07 +0200)]
filechooserwidget: Don't focus treeview when searching
It's just weird that the search entry does not have focus while we type.
Timm Bäder [Sun, 28 Apr 2019 09:05:37 +0000 (11:05 +0200)]
filechooserwidget: Remove some GdkEvent usage
Timm Bäder [Sun, 28 Apr 2019 09:02:59 +0000 (11:02 +0200)]
filechooserbutton: Remove some dead code
Timm Bäder [Sun, 28 Apr 2019 08:55:10 +0000 (10:55 +0200)]
colorbutton: Remove unneeded snapshot implementation
Timm Bäder [Sun, 28 Apr 2019 08:34:47 +0000 (10:34 +0200)]
Adwaita: Bring filechooserbutton spacing back
Add some space between the icons and the text, like there was in gtk3.
Timm Bäder [Sun, 28 Apr 2019 06:30:18 +0000 (08:30 +0200)]
entry: Fix primary icon allocation in RTL entries
The primary icon is on the right in RTL, so don't offset the text child
to the right for it.
Fixes the text and icon overlapping in the second entry
in tests/testentryicons
Timm Bäder [Sun, 28 Apr 2019 05:46:17 +0000 (07:46 +0200)]
gl renderer: Add simple blend node implementation
Timm Bäder [Sun, 28 Apr 2019 04:54:10 +0000 (06:54 +0200)]
treeview: Always update expand when allocating columns
It doesn't make sense to keep track of all the last_* values anymore now
that widgets only get allocated when their size changes anyway.
Remove all the associated (and thus now unused) flags as well.
Timm Bäder [Sun, 28 Apr 2019 04:50:57 +0000 (06:50 +0200)]
treeview: Remove a useless check
Timm Bäder [Sun, 28 Apr 2019 04:45:33 +0000 (06:45 +0200)]
treeview: Remove unused member
Matthias Clasen [Sat, 27 Apr 2019 18:09:57 +0000 (18:09 +0000)]
Merge branch 'popover-demos' into 'master'
Popover demos
See merge request GNOME/gtk!782
Matthias Clasen [Sat, 27 Apr 2019 18:00:22 +0000 (18:00 +0000)]
widget-factory: Make a resizing popover
Add an expander to a popover to test how
changing sizes works with popovers.
Matthias Clasen [Sat, 27 Apr 2019 17:52:02 +0000 (17:52 +0000)]
Merge branch 'file-chooser-search' into 'master'
file chooser: Fix Ctrl-L
Closes #1829
See merge request GNOME/gtk!781
Matthias Clasen [Tue, 23 Apr 2019 19:00:44 +0000 (19:00 +0000)]
widget-factory: Add some nested popovers
These are mainly for stress-testing our
popover implementations.
Matthias Clasen [Mon, 22 Apr 2019 15:36:42 +0000 (15:36 +0000)]
widget-factory: Add non-modal popovers
This makes is easy to test moving the toplevel
or repositioning the parent while the popover
is shown.
Matthias Clasen [Sat, 27 Apr 2019 17:43:59 +0000 (17:43 +0000)]
file chooser: Fix Ctrl-L
We were forwarding key events to the search entry
and unconditionally considered search started
afterwards. That is not correct, since things
like a Ctrl key press should not trigger search.
Fix this by only switching to search mode when
the event was actually consumed.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1829
Matthias Clasen [Sat, 27 Apr 2019 16:08:53 +0000 (16:08 +0000)]
Merge branch 'font-chooser-search' into 'master'
fontchooser: Fix type-to-search
Closes #1842
See merge request GNOME/gtk!780
Matthias Clasen [Sat, 27 Apr 2019 15:59:45 +0000 (15:59 +0000)]
fontchooser: Fix type-to-search
The key capture was interfering with other
entries in the dialog, so be smarter about
when we want to capture keys and when we
don't.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1842
Timm Bäder [Sat, 27 Apr 2019 06:20:30 +0000 (08:20 +0200)]
searchentry: Always measure and allocate icon
Just measuring it (so the warning goes away) but then not using the
values will later underallocate the text widget.
Instead, always reserve space for the icon (which will inevitable be
visible as soon as the searchentry is actually being used).
Fixes #1831
Timm Bäder [Sat, 27 Apr 2019 06:12:46 +0000 (08:12 +0200)]
Adwaita: separate '.view text' from textview>text
The first rule breaks GtkText inside GtkSearchEntry inside something
that has .view applied, as found in the file chooser when searching.
Benjamin Otte [Sat, 27 Apr 2019 03:06:30 +0000 (05:06 +0200)]
testsuite: Rewrite text diff to use GSubprocess
... instead of g_spawn(). Avoids having to create a temp file, too.
Timm Bäder [Wed, 24 Apr 2019 12:25:54 +0000 (14:25 +0200)]
gl renderer: bind the texture framebuffer before rendering
When rendering to a texture, collecting the render ops might bind a
different framebuffer, so bind the one we want again before doing the
actual rendering.
Timm Bäder [Fri, 26 Apr 2019 05:34:18 +0000 (07:34 +0200)]
tooltip: Initialize tooltip coords to given event coords
Otherwise the coordinates passed to the query-tooltip signal are always
0.
Matthias Clasen [Thu, 25 Apr 2019 16:42:42 +0000 (16:42 +0000)]
Merge branch 'wip/surface-transform-data' into 'master'
Surface transform listener fixes
See merge request GNOME/gtk!776
Chun-wei Fan [Thu, 25 Apr 2019 15:44:59 +0000 (15:44 +0000)]
Merge branch 'fix-gdkwin32-move-drag' into 'master'
gdksurface-win32.c: Acquire root coordinates on drag/move
See merge request GNOME/gtk!693
Jonas Ådahl [Thu, 25 Apr 2019 13:39:06 +0000 (15:39 +0200)]
widget: Move surface relative transform fields into its own struct
The purpose being to reduce the size of GtkWidgetPrivate. What is left
is a pointer to the allocated struct.
Daniel Mustieles [Thu, 25 Apr 2019 13:58:58 +0000 (15:58 +0200)]
Updated Spanish translation
Matthias Clasen [Thu, 25 Apr 2019 13:16:09 +0000 (13:16 +0000)]
Merge branch 'wip/alexl/gl-debug' into 'master'
Add GL debugging integration
See merge request GNOME/gtk!771
Jonas Ådahl [Thu, 25 Apr 2019 12:29:19 +0000 (14:29 +0200)]
widget: Remove leftover parent-changed handler removal
It was never added, as the listener was replaced by explicit code in
gtk_widget_(un)root(), but the removal code was left in place in error.
Alexander Larsson [Wed, 24 Apr 2019 13:23:32 +0000 (15:23 +0200)]
gdkglcontext: Only emit opengl debug calls if GDK_DEBUG=gl-debug
This avoids a potential performance cost in the non-debug case.
Alexander Larsson [Wed, 24 Apr 2019 11:28:11 +0000 (13:28 +0200)]
GskGLRenderer: Add debug groups
This adds debug groups in various places, including the debug
nodes if those are in use. This makes the traces in tools like
renderdoc much easier to read.
Alexander Larsson [Wed, 24 Apr 2019 11:27:43 +0000 (13:27 +0200)]
GskGLRenderer: Label various gl objects
This means the names are more useful in tools like renderdoc.
Alexander Larsson [Wed, 24 Apr 2019 11:25:46 +0000 (13:25 +0200)]
GdkGLContext: Add internal functions for KHR_DEBUG calls
This includes pushing and poping debug group messages and labeling
objects.
Matthias Clasen [Thu, 25 Apr 2019 01:18:54 +0000 (01:18 +0000)]
Merge branch 'parent-surface' into 'master'
Drop the parent surface getter and setter
See merge request GNOME/gtk!774
Matthias Clasen [Thu, 25 Apr 2019 00:54:56 +0000 (20:54 -0400)]
widget: Drop gtk_widget_set_parent_surface
And the getter, too. Widgets no longer have
extra surfaces that could serve as parent surfaces.
Matthias Clasen [Thu, 25 Apr 2019 00:54:25 +0000 (20:54 -0400)]
popover: Stop using gtk_widget_get_parent_surface
We can just use the surface of the parent.
Matthias Clasen [Thu, 25 Apr 2019 00:56:43 +0000 (20:56 -0400)]
tests: Stop using gtk_widget_get_parent_surface
We can just use the surface of the parent.
Matthias Clasen [Thu, 25 Apr 2019 00:54:05 +0000 (20:54 -0400)]
a11y: Stop using gtk_widget_get_parent_surface
We can just use the surface of the parent.
Matthias Clasen [Wed, 24 Apr 2019 19:26:27 +0000 (19:26 +0000)]
Merge branch 'wip/widget-position-changed-callbacks' into 'master'
widget: Add surface relative position changed callback
See merge request GNOME/gtk!760
Matthias Clasen [Wed, 24 Apr 2019 19:23:12 +0000 (19:23 +0000)]
Merge branch 'fix-and-improve-linked-button-style' into 'master'
themes: Fix and improve linked button style
Closes #1294
See merge request GNOME/gtk!730
Matthias Clasen [Wed, 24 Apr 2019 19:08:40 +0000 (19:08 +0000)]
Merge branch 'wip/jimmac/type-experiments' into 'master'
Adwaita: generic type styles
See merge request GNOME/gtk!772
Jakub Steiner [Thu, 11 Apr 2019 12:50:56 +0000 (14:50 +0200)]
Adwaita: generic type styles
- try to define a basic typographic structure
See https://gitlab.gnome.org/GNOME/gtk/issues/1808
Matthias Clasen [Wed, 24 Apr 2019 16:56:40 +0000 (16:56 +0000)]
Merge branch 'csserror-g-decls' into 'master'
csserror: Add G_BEGIN_DECLS and G_END_DECLS
See merge request GNOME/gtk!773
Timm Bäder [Wed, 24 Apr 2019 15:55:14 +0000 (17:55 +0200)]
gl renderer: Keep op builder around
GL keeps the unoform state per-program, but not per-frame. So, we can't
pretend that this works for us. Keep the RenderOpBuilder around for the
entire lifetime of the renderer instead.
Kjell Ahlstedt [Wed, 24 Apr 2019 14:32:54 +0000 (16:32 +0200)]
csserror: Add G_BEGIN_DECLS and G_END_DECLS
Necessary when the header file is included in C++ code.
Merge request !773
Jonas Ådahl [Thu, 18 Apr 2019 16:55:13 +0000 (18:55 +0200)]
widget: Add surface relative transform changed callback
Added two new private GtkWidget API:
* gtk_widget_add_surface_transform_changed_callback()
* gtk_widget_remove_surface_transform_changed_callback()
The intention is to let the user know when a widget transform relative
to the surface changes. It works by calculating the surface relative
transform during allocation, and notifying the callbacks if it changed
since last time. Each widget adds itself as a listener to its parent
widget, thus will be triggered if a parents surface relative transform
changes.
Timm Bäder [Wed, 24 Apr 2019 10:56:44 +0000 (12:56 +0200)]
gl renderer: Sync gpu and cpu default alpha value
Otherwise we might end up not passing the new value to the GPU.
Timm Bäder [Wed, 24 Apr 2019 10:56:23 +0000 (12:56 +0200)]
gl renderer: Properly apply opacity in cross-fade shader
Daniel Mustieles [Wed, 24 Apr 2019 07:52:46 +0000 (09:52 +0200)]
Updated Spanish translation
Matthias Clasen [Tue, 23 Apr 2019 21:39:29 +0000 (21:39 +0000)]
Merge branch 'simplify-fixes' into 'master'
Simplify fixes
See merge request GNOME/gtk!770
Matthias Clasen [Tue, 23 Apr 2019 21:30:00 +0000 (17:30 -0400)]
builder-tool: Check canonical names
Always canonicalize names before comparing.
We were missing properties like left_attach,
since we were comparing them to left-attach.
Matthias Clasen [Tue, 23 Apr 2019 21:25:59 +0000 (21:25 +0000)]
builder-tool: Fix property check
Embarrassingly, there was a missing else
causing us to check all packing properties
as object properties, never finding them.
Timm Bäder [Tue, 23 Apr 2019 15:24:19 +0000 (17:24 +0200)]
eventcontrollermotion: Document missing signal parameters
Timm Bäder [Tue, 23 Apr 2019 15:24:07 +0000 (17:24 +0200)]
cssprovider: Fix a parameter name mismatch
Benjamin Otte [Tue, 19 Mar 2019 02:57:04 +0000 (03:57 +0100)]
testsuite: Don't pretend we're a GTest
This is a meson test, not a GTest thing. So:
- Use g_print(), not g_test_message
That makes meson test --verbose print the actual log messsages.
- Don't g_assert() all the time
Instead, run tests through to the end and just return a non-0 exit
status.
Timm Bäder [Mon, 22 Apr 2019 12:20:02 +0000 (14:20 +0200)]
gl renderer: begin/end_frame around do_render
This fixes rendering to a texture on intel hardware. The glClear calls
would throw a GL_FRAMEBUFFER_INCOMPLETE error here, because the
gsk_gl_driver_begin_frame() call in do_render() reset the framebuffer
object in use.
Timm Bäder [Mon, 22 Apr 2019 09:31:12 +0000 (11:31 +0200)]
GdkWaylandDevice: Don't recreate the default cursor every frame
Save the information whether the cursor in use is the default one, and
don't create a new cursor object in that case.
We previously created a new cursor object every frame just to compare it
to the current cursor in use and then throw it away.
Daniel Mustieles [Tue, 23 Apr 2019 08:30:35 +0000 (10:30 +0200)]
Updated Spanish translation
Daniel Mustieles [Tue, 23 Apr 2019 08:29:32 +0000 (10:29 +0200)]
Updated Spanish translation
Matthias Clasen [Tue, 23 Apr 2019 01:37:39 +0000 (01:37 +0000)]
Merge branch 'forgotten-file' into 'master'
window: Remove dropped api from headers
See merge request GNOME/gtk!769
Matthias Clasen [Tue, 23 Apr 2019 01:23:01 +0000 (01:23 +0000)]
window: Remove dropped api from headers
This was forgotten in
fed2db1493606342.
Benjamin Otte [Sun, 21 Apr 2019 18:08:05 +0000 (20:08 +0200)]
gdk: Remove gdk_surface_invalidate_rect() from public API
It's still available for backends, but public API (read: GTK) is
meant to only call gdk_surface_queue_expose() and track its
invalid region itself.
Matthias Clasen [Sun, 21 Apr 2019 15:41:25 +0000 (15:41 +0000)]
Merge branch 'unused-typehint' into 'master'
gdk: Remove an unused field
See merge request GNOME/gtk!767
Matthias Clasen [Sun, 21 Apr 2019 15:18:22 +0000 (11:18 -0400)]
gdk: Remove an unused field
Its not used, so get rid of it.
Matthias Clasen [Sat, 20 Apr 2019 02:46:26 +0000 (02:46 +0000)]
Merge branch 'drop-skip-pager' into 'master'
window: Drop some x11-specific apis
See merge request GNOME/gtk!766
Matthias Clasen [Sat, 20 Apr 2019 01:38:12 +0000 (01:38 +0000)]
surface: Drop group api
This was only ever implemented on X11, and
GTK is not using it at all. Relegate it to
x11-specific api.
Matthias Clasen [Sat, 20 Apr 2019 01:13:41 +0000 (01:13 +0000)]
window: Drop some x11-specific apis
The skip-taskbar, skip-pager and urgency hints were
only ever implemented for X11, and are not very useful
with modern desktops. Relegate the functionality to
x11 backend api, and drop the GtkWindow api.
Matthias Clasen [Sat, 23 Mar 2019 04:13:15 +0000 (00:13 -0400)]
Fix a compiler warning
Matthias Clasen [Wed, 20 Mar 2019 00:04:49 +0000 (20:04 -0400)]
wayland: Improve debug output for events
We were missing surfaces in a few places.
Benjamin Otte [Fri, 19 Apr 2019 01:48:59 +0000 (01:48 +0000)]
Merge branch 'cairo-borders-fixage' into 'master'
Cairo borders fixage
See merge request GNOME/gtk!765
Benjamin Otte [Fri, 19 Apr 2019 01:37:55 +0000 (03:37 +0200)]
rendernode: Fix border rendering
This fixed the reftest introduced in the previous commit.
I'm using a mesh gradient here instead of drawing 4 individual sides to
avoid artifacts when those sides overlap in rounded corners.
Benjamin Otte [Fri, 19 Apr 2019 00:28:37 +0000 (02:28 +0200)]
reftests: Add a reftest for rendering failure
c18d2872f292607c921c959e6e97c4d6635bdfd2 introduced a misrendering in
the Cairo fallback rendering code while fixing another one.
This test exposes that problem.
Related: !756
Matthias Clasen [Thu, 18 Apr 2019 20:15:39 +0000 (20:15 +0000)]
window: Fix an oversight
We must still reset cursors.
Matthias Clasen [Thu, 18 Apr 2019 19:38:56 +0000 (19:38 +0000)]
Merge branch 'cursor-things' into 'master'
Cursor things
See merge request GNOME/gtk!764
Matthias Clasen [Thu, 18 Apr 2019 19:07:01 +0000 (15:07 -0400)]
window: Stop juggling cursors
We have convenience api for this.
Matthias Clasen [Thu, 18 Apr 2019 19:06:35 +0000 (15:06 -0400)]
text: Stop juggling cursors
We have a convenience api for this.
Matthias Clasen [Thu, 18 Apr 2019 19:06:09 +0000 (15:06 -0400)]
label: Stop juggling cursors
We have a convenience api for this.
Matthias Clasen [Thu, 18 Apr 2019 18:20:06 +0000 (18:20 +0000)]
Merge branch 'style-prop-change' into 'master'
Style prop change
See merge request GNOME/gtk!763
Matthias Clasen [Thu, 18 Apr 2019 18:08:10 +0000 (18:08 +0000)]
css: Kerning affects text size
Thats the point. And we were missing the proper
flags to make GTK do the right thing when
changing font-kerning in the inspector.
Matthias Clasen [Thu, 18 Apr 2019 18:04:58 +0000 (18:04 +0000)]
css: Some updates to internal docs
Minor corrections to the AFFECTS flags docs.
Matthias Clasen [Thu, 18 Apr 2019 17:46:35 +0000 (17:46 +0000)]
Merge branch 'letterspacing-resize' into 'master'
css: Letterspacing affects text size
See merge request GNOME/gtk!762
Carlos Garnacho [Thu, 18 Apr 2019 17:35:45 +0000 (17:35 +0000)]
Merge branch 'wip/carlosg/tablet-cursors-hidpi-master' into 'master'
gdk/wayland: Listen to wl_surface events on tablet cursors
Closes #1675
See merge request GNOME/gtk!761
Matthias Clasen [Thu, 18 Apr 2019 17:34:44 +0000 (17:34 +0000)]
css: Letterspacing affects text size
It does. And we were missing the proper
flags to make GTK do the right thing when
changing letter-spacing in the inspector.
Carlos Garnacho [Thu, 18 Apr 2019 17:31:55 +0000 (19:31 +0200)]
gdk/wayland: Listen to wl_surface events on tablet cursors
And update the surface accordingly (eg. scale on hidpi). The mechanism
that did that for wl_pointer has been made generic so it can be shared
with tablets too.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1675
Matthias Clasen [Thu, 18 Apr 2019 16:55:28 +0000 (16:55 +0000)]
Merge branch 'handle-tool-scale-fix' into 'master'
gdkdevice-wayland: Update pointer scale on tablet tool proximity events
See merge request GNOME/gtk!582
Jonas Ådahl [Thu, 18 Apr 2019 14:35:06 +0000 (14:35 +0000)]
Merge branch 'wayland-cursor-hotspot' into 'master'
wayland: Avoid using uninitialized memory
Closes #1328
See merge request GNOME/gtk!757
Matthias Clasen [Thu, 18 Apr 2019 14:22:48 +0000 (14:22 +0000)]
wayland: Avoid using uninitialized memory
_gdk_wayland_cursor_get_buffer was not initializing
its out variables in the 'not found' case. This
was showing up in protocol traces as garbage hotspots
being sent to the compositor.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1328
Benjamin Otte [Thu, 18 Apr 2019 00:18:42 +0000 (02:18 +0200)]
testsuite: Add theme-validate test
The test just loads all of GTK's themes and makes sure they cause no
errors or warnings from the CSS parser.
Benjamin Otte [Thu, 18 Apr 2019 00:24:41 +0000 (02:24 +0200)]
themes: Regenerate CSS
Seems to have been forgotten a few times.
Benjamin Otte [Thu, 18 Apr 2019 00:05:58 +0000 (02:05 +0200)]
cssprovider: Export correct API
gtk_css_provider_get_named() is the old GTK3 style API to load themes.
Instead, export the function we currently use,
gtk_css_provider_load_named().
As a side effect we allow people to load a theme as often as they want
without conflicting with GTK's theme.
Matthias Clasen [Thu, 18 Apr 2019 00:12:34 +0000 (00:12 +0000)]
Survive absence of librsvg without criticals
We can't guarantee that we can load svgs, so
we shouldn't spew criticals when some of our
own resources fail to load due to that reason.
Matthias Clasen [Thu, 18 Apr 2019 00:08:16 +0000 (00:08 +0000)]
Avoid a crash without librsvg
gtk_css_image_recolor_load_texture may leave
recolor->text as NULL without setting error.
No need to crash for that.